package com.holike.crm.activity.credit;

import android.os.Bundle;
import android.text.TextUtils;

import com.holike.crm.R;
import com.holike.crm.base.BasePresenter;
import com.holike.crm.base.BaseActivity;
import com.holike.crm.fragment.bank.BillSummaryFragment;
import com.holike.crm.fragment.bank.CreditInquiryFragment;
import com.holike.crm.fragment.bank.OnlineDeclarationFragment;
import com.holike.crm.fragment.bank.PayListFragment;
import com.holike.crm.util.Constants;

public class CreditInquiryActivity extends BaseActivity {

    @Override
    protected BasePresenter attachPresenter() {
        return null;
    }

    @Override
    protected int getLayoutResourceId() {
        return R.layout.activity_fragment_depend;
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        super.init(savedInstanceState);
        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            String type = bundle.getString(Constants.CREDIT_TYPE);
            if (TextUtils.equals(type, "1")) {
                startFragment(new CreditInquiryFragment());
            } else if (TextUtils.equals(type, "2")) {
                startFragment(new BillSummaryFragment());
            } else if (TextUtils.equals(type, "3")) {
                startFragment(new OnlineDeclarationFragment());
            } else if (TextUtils.equals(type, "4")) {
                startFragment(new PayListFragment());
            }
        }
    }
}
